package com.atguigu.a_operator;

public class Demo7 {
    public static void main(String[] args) {
        //二进制数的逻辑运算
        System.out.println(9 & 7);//1
        System.out.println(9 | 7);//15
        System.out.println(9 ^ 7);//14
        //~ : 取反
        System.out.println(~7);//-8

        System.out.println("-----------------------");

        System.out.println(8 >> 2);//2
        System.out.println(8 << 2);//32
    }
}
